<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<title>家庭博客</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<%=basePath%>css/style.css" type="text/css" media="all" />
<script src="<%=basePath%>js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(function(){	
	//顶部导航切换
	$(".nav li a").click(function(){
		$(".nav li a.selected").removeClass("selected");
		$(this).addClass("selected");
	})	
});
function quitFun(){	
	$.ajax({
	    type:"post",
	    url:"<%=basePath%>userController/quit",      // 这里是提交到什么地方的url
	    data:{},            // 这里把表单里面的数据放在这里传到后台
	    dataType:"json",
	    success:function(date){
	    	window.location.href="login.jsp"
	    }
	   /*  error:function(){  
	    	$("#msg").html("用户名或密码错误！"); 
        }  */ 
	 });
}
</script>
</head>
<body style="font-size: 16px;">
<div class="wrap">
<span id="user" style="color:#99CC00;">${user.userName}，欢迎来到[${user.familyName}]！</span>
<button id="quit" onclick="quitFun()">退出</button>
<div class="logo"><a href="index.jsp"><img src="images/logo.png" alt="" /></a></div>
<div class="nav">
	<ul>
		<li><a href="<%=basePath%>pageController/index"><span style="color:blue;">家庭主页</span></a></li>
		<li><a href="<%=basePath%>pageController/myFamily">我的家庭</a></li>
		<li><a href="<%=basePath%>pageController/dynamics?familyId=${user.familyId}">家庭动态</a></li>
		<li><a href="<%=basePath%>pageController/photo?userId=${user.id}">家庭相册</a></li>
	</ul>
</div>
<div class="clear"></div>
</div>

	<div id="header">
		<div class="wrap">
			<div class="banner">
				<ul class="texts">
					<p style="font-size:21px; font-family: 华文行楷">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家，永远在我的记忆里，在我的意识里，在醒来梦去的眸子里，清晰如昨。 </p>
					<p style="font-size:21px; font-family: 华文行楷">&nbsp;&nbsp;&nbsp;&nbsp;家是温馨的港湾，容纳漂泊的灵魂；家是如伞的大树，遮挡酷夏的骄阳；</p>
					<p style="font-size:21px; font-family: 华文行楷">家是清凉的雨丝，拂去疲惫的征尘；家是永远的牵挂，珍藏幸福的存根。</p>
				</ul>
			</div>
			<div class="clear"></div>
		</div>
	</div>
    <!--header结束-->
	<div id="main">
	    <div class="wrap">
			<div class="bloglist">
            <h2><p><span style="font-size:22px; font-family: 华文行楷">生活点滴</span></p></h2>
				<c:if test="${thisUserSpeaks!=null}">
				<c:forEach items="${thisUserSpeaks}" var="thisUserSpeak" varStatus="thisUserSpeaks">
					<div class="blogs">
						<c:if test="${thisUserSpeak.picture!=''}">
							<figure>
								<img src="${thisUserSpeak.picture}" >
							</figure>
						</c:if>
						<ul>
							<p>&nbsp;${thisUserSpeak.content}</p>
						</ul>
						<p class="autor">
							<span>发表：<font size="3" color="#99CC00" face="verdana">${thisUserSpeak.userName}</font></span>
							<span>浏览（<a href="/">${thisUserSpeak.viewQty}</a>）</span><span>获赞（<a href="/">${thisUserSpeak.goodQty}</a>）</span><span>评论（<a href="/">${thisUserSpeak.comQty}</a>）</span></p>
						<div class="dateview">${thisUserSpeak.createTime}</div>
					</div>
				</c:forEach>
				</c:if>
            </div>
		</div>
		<div class="clear"></div>
	</div>
	<div class="foot">
		<div class="wrap">
			<div id="fbr">
				<p style="font-size:15px; font-family: 华文行楷">Copyright &copy; 家庭博客（2017）.</p>
			    <div class="ft-nav">
					<ul>
						<li class="active"><a href="<%=basePath%>pageController/index">家庭主页</a></li>
						<li><a href="<%=basePath%>pageController/myFamily">我的家庭</a></li>
						<li><a href="<%=basePath%>pageController/dynamics?familyId=${user.familyId}">家庭动态</a></li>
						<li><a href="<%=basePath%>pageController/photo?userId=${user.id}">家庭相册</a></li>
					</ul>
				</div>
				<div class="clear"></div>
		    </div>
	    </div>
	</div>
</body>
</html>